package com.sq.es;




import com.sq.common.ana.annotation.DocField;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @Author Li sir
 * @Date 2024/1/23
 */
public class utilsIndexUtils {


    /**
     *
     * @param clazz 判断的类型
     * @param list 带有字段的
     * @param fieldes
     * @return
     * @param <T>
     */
    public static <T>  String getClassMapping(Class<T> clazz, List<T> list, Field[] fieldes){

        Field[] fields = clazz.getDeclaredFields();

        List<Field> fieldList = new ArrayList<>();

        // 过滤字段
        for (Field field : fields){

            Field[] declaredFields = field.getType().getDeclaredFields();

            DocField docField = field.getAnnotation(DocField.class);
            if (Objects.isNull(docField)){
                continue;
            }
            // 判断字段类型是否为object

            fieldList.add(field);
        }

    return "o";
    }

    public static void main(String[] args) {
//        getClassMapping(User.class,new ArrayList<>(),null);
    }

}
